package br.hm.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

	public static final SimpleDateFormat FORMAT_DDMMYYYY = new SimpleDateFormat("dd/MM/yyyy");
	
	public static final SimpleDateFormat FORMAT_DDMMYYYY_HHmm = new SimpleDateFormat("dd/MM/yyyy HH:mm");
	
	public static String convertToStringDDMMYYYY(Date date){
		return FORMAT_DDMMYYYY.format(date);
	}

	public static String convertToStringDDMMYYYY_HHMM(Date date){
		return FORMAT_DDMMYYYY_HHmm.format(date);
	}

	
	public static Date convertStringDDMMYYYY_HHMMToDate(String source) throws ParseException{
		return FORMAT_DDMMYYYY_HHmm.parse(source);
	}


}
